﻿Imports GalaSoft.MvvmLight
Imports GalaSoft.MvvmLight.Command
Imports Pronama.NicoVideo
Imports Pronama.NicoVideo.LiveStreaming

Namespace ViewModel
    Public Class AlertTargetViewModel
        Inherits ViewModelBase


#Region "Properties"

        Private _Type As AlertTargetType
        Property Type As AlertTargetType
            Get
                Return _Type
            End Get
            Set(ByVal value As AlertTargetType)
                If value <> _Type Then
                    _Type = value
                    RaisePropertyChanged("Type")
                    RaisePropertyChanged("TypeFriendlyName")
                End If
            End Set
        End Property

        ReadOnly Property TypeFriendlyName As String
            Get
                'Select Case _Type


                'End Select
                Return Me.Type.ToString
            End Get
        End Property

        Private _Name As String
        Property Name As String
            Get
                Return _Name
            End Get
            Set(ByVal value As String)
                If value <> _Name Then
                    _Name = value
                    RaisePropertyChanged("Name")
                End If
            End Set
        End Property

        Private _AlertByWindow As Boolean
        Property AlertByWindow As Boolean
            Get
                Return _AlertByWindow
            End Get
            Set(ByVal value As Boolean)
                If value <> _AlertByWindow Then
                    _AlertByWindow = value
                    RaisePropertyChanged("AlertByWindow")
                End If
            End Set
        End Property

        Private _AlertByBrowser As Boolean
        Property AlertByBrowser As Boolean
            Get
                Return _AlertByBrowser
            End Get
            Set(ByVal value As Boolean)
                If value <> _AlertByBrowser Then
                    _AlertByBrowser = value
                    RaisePropertyChanged("AlertByBrowser")
                End If
            End Set
        End Property


        'Private _StartDateTime As DateTime
        'Property StartDateTime As DateTime
        '    Get
        '        Return _StartDateTime
        '    End Get
        '    Set(ByVal value As DateTime)
        '        If value <> _StartDateTime Then
        '            _StartDateTime = value
        '            RaisePropertyChanged("StartDateTime")
        '        End If
        '    End Set
        'End Property

        'Private _ElapsedTimeText As String
        'Property ElapsedTimeText As String
        '    Get
        '        Return _ElapsedTimeText
        '    End Get
        '    Set(ByVal value As String)
        '        If value <> _ElapsedTimeText Then
        '            _ElapsedTimeText = value
        '            RaisePropertyChanged("ElapsedTimeText")
        '        End If
        '    End Set
        'End Property

        'Private _Title As String
        'Property Title As String
        '    Get
        '        Return _Title
        '    End Get
        '    Set(ByVal value As String)
        '        If value <> _Title Then
        '            _Title = value
        '            RaisePropertyChanged("Title")
        '        End If
        '    End Set
        'End Property

        'Private _Description As String
        'Property Description As String
        '    Get
        '        Return _Description
        '    End Get
        '    Set(ByVal value As String)
        '        If value <> _Description Then
        '            _Description = value
        '            RaisePropertyChanged("Description")
        '        End If
        '    End Set
        'End Property

        'Private _IsOnAir As Boolean
        'Property IsOnAir As Boolean
        '    Get
        '        Return _IsOnAir
        '    End Get
        '    Set(ByVal value As Boolean)
        '        If value <> _IsOnAir Then
        '            _IsOnAir = value
        '            RaisePropertyChanged("IsOnAir")
        '        End If
        '    End Set
        'End Property

        'Private _IsVisited As Boolean
        'Property IsVisited As Boolean
        '    Get
        '        Return _IsVisited
        '    End Get
        '    Set(ByVal value As Boolean)
        '        If value <> _IsVisited Then
        '            _IsVisited = value
        '            RaisePropertyChanged("IsVisited")
        '        End If
        '    End Set
        'End Property

        'Private _IsRemoved As Boolean
        'Property IsRemoved As Boolean
        '    Get
        '        Return _IsRemoved
        '    End Get
        '    Set(ByVal value As Boolean)
        '        If value <> _IsRemoved Then
        '            _IsRemoved = value
        '            RaisePropertyChanged("IsRemoved")
        '        End If
        '    End Set
        'End Property

        Private _Id As String
        Property Id As String
            Get
                Return _Id
            End Get
            Set(ByVal value As String)
                If value <> _Id Then
                    _Id = value
                    RaisePropertyChanged("Id")
                End If
            End Set
        End Property

        'Private _Uri As Uri
        'Property Uri As Uri
        '    Get
        '        Return _Uri
        '    End Get
        '    Set(ByVal value As Uri)
        '        If value <> _Uri Then
        '            _Uri = value
        '            RaisePropertyChanged("Uri")
        '        End If
        '    End Set
        'End Property

        'Private _IconUri As Uri
        'Property IconUri As Uri
        '    Get
        '        Return _IconUri
        '    End Get
        '    Set(ByVal value As Uri)
        '        If value <> _IconUri Then
        '            _IconUri = value
        '            RaisePropertyChanged("IconUri")
        '        End If
        '    End Set
        'End Property

        'Private _StationId As String
        'Property StationId As String
        '    Get
        '        Return _StationId
        '    End Get
        '    Set(ByVal value As String)
        '        If value <> _StationId Then
        '            _StationId = value
        '            RaisePropertyChanged("StationId")
        '        End If
        '    End Set
        'End Property

        'Private _StationName As String
        'Property StationName As String
        '    Get
        '        Return _StationName
        '    End Get
        '    Set(ByVal value As String)
        '        If value <> _StationName Then
        '            _StationName = value
        '            RaisePropertyChanged("StationName")
        '        End If
        '    End Set
        'End Property

        ' TODO
        Property NormalizedText As String


        'Private _OpenUriCommand As ICommand
        'Public ReadOnly Property OpenUriCommand As ICommand
        '    Get
        '        If _OpenUriCommand Is Nothing Then
        '            _OpenUriCommand = New RelayCommand(
        '                New Action(Of Object)(
        '                    Sub(parameter As Object)
        '                        Me.
        '                    End Sub))
        '        End If
        '        Return _OpenUriCommand
        '    End Get
        'End Property


#End Region

        'Public Sub UpdateElapsedTime()
        '    Dim t = Now.Subtract(StartDateTime)

        '    If t.TotalMinutes < 1 Then
        '        Me.ElapsedTimeText = Math.Floor(t.TotalSeconds).ToString & "秒前"
        '    ElseIf t.TotalHours < 1 Then
        '        Me.ElapsedTimeText = Math.Ceiling(t.TotalMinutes).ToString & "分前"
        '    ElseIf t.TotalDays < 1 Then
        '        Me.ElapsedTimeText = Math.Ceiling(t.TotalHours).ToString & "時間前"
        '    Else
        '        Me.ElapsedTimeText = Math.Round(t.TotalDays).ToString & "日前"
        '    End If

        'End Sub


    End Class
End Namespace
